<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class RoomGroupRequest extends MineFormRequest
{
    public function saveRules(): array
    {
        return [
            'name' => 'required'
        ];
    }

    public function updateRules(): array
    {
        $update = [
            'id' => 'required'
        ];

        return array_merge($update, $this->saveRules());
    }

    public function deleteRules(): array
    {
        return [
            'id' => 'required'
        ];
    }
    public function moveGroupRules(): array
    {
        return [
            'room_ids' => 'required',
            'group_id' => 'required',
            'old_group_id' => 'required|integer|min:0',
            'type' => 'required|in:0,1'
        ];
    }
}